package com.king.prototype.demo01;


import java.util.Date;

/**
 * 原型 video类
 * 实现clone：
 * 1 实现接口 Cloneable
 * 2 重写方法 clone
 */
public class Video implements Cloneable{

    private String name;

    private Date creatTime;

    public Video(String name, Date creatTime) {
        this.name = name;
        this.creatTime = creatTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    public String toString() {
        return "Video{" +
                "name='" + name + '\'' +
                ", creatTime=" + creatTime +
                '}';
    }
}
